# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Developer do
  @moduledoc """


  ## Attributes

  *   `accessType` (*type:* `String.t`, *default:* `nil`) - Access type.
  *   `appFamily` (*type:* `String.t`, *default:* `nil`) - Developer app family.
  *   `apps` (*type:* `list(String.t)`, *default:* `nil`) - List of apps associated with the developer.
  *   `attributes` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t)`, *default:* `nil`) - Optional. Developer attributes (name/value pairs). The custom attribute limit is 18.
  *   `companies` (*type:* `list(String.t)`, *default:* `nil`) - List of companies associated with the developer.
  *   `createdAt` (*type:* `String.t`, *default:* `nil`) - Output only. Time at which the developer was created in milliseconds since epoch.
  *   `developerId` (*type:* `String.t`, *default:* `nil`) - ID of the developer. **Note**: IDs are generated internally by Apigee and are not guaranteed to stay the same over time.
  *   `email` (*type:* `String.t`, *default:* `nil`) - Required. Email address of the developer. This value is used to uniquely identify the developer in Apigee hybrid. Note that the email address has to be in lowercase only.
  *   `firstName` (*type:* `String.t`, *default:* `nil`) - Required. First name of the developer.
  *   `lastModifiedAt` (*type:* `String.t`, *default:* `nil`) - Output only. Time at which the developer was last modified in milliseconds since epoch.
  *   `lastName` (*type:* `String.t`, *default:* `nil`) - Required. Last name of the developer.
  *   `organizationName` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the Apigee organization in which the developer resides.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Output only. Status of the developer. Valid values are `active` and `inactive`.
  *   `userName` (*type:* `String.t`, *default:* `nil`) - Required. User name of the developer. Not used by Apigee hybrid.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessType => String.t() | nil,
          :appFamily => String.t() | nil,
          :apps => list(String.t()) | nil,
          :attributes => list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t()) | nil,
          :companies => list(String.t()) | nil,
          :createdAt => String.t() | nil,
          :developerId => String.t() | nil,
          :email => String.t() | nil,
          :firstName => String.t() | nil,
          :lastModifiedAt => String.t() | nil,
          :lastName => String.t() | nil,
          :organizationName => String.t() | nil,
          :status => String.t() | nil,
          :userName => String.t() | nil
        }

  field(:accessType)
  field(:appFamily)
  field(:apps, type: :list)
  field(:attributes, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute, type: :list)
  field(:companies, type: :list)
  field(:createdAt)
  field(:developerId)
  field(:email)
  field(:firstName)
  field(:lastModifiedAt)
  field(:lastName)
  field(:organizationName)
  field(:status)
  field(:userName)
end

defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Developer do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Developer.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Developer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
